Advanced Debugging
About AdvDbg Consult Train Services Products Tools Community Contact  
欢迎光临 高端调试 登录 | 注册 | FAQ
 
  ACPI调试
Linux内核调试
Windows内核调试
 
  调试战役
调试原理
新工具观察
 
  Linux
Windows Vista
Windows
 
  Linux驱动
WDF
WDM
 
  PCI Express
PCI/PCI-X
USB
无线通信协议
 
  64位CPU
ARM
IA-32
  CPU Info Center
 
  ACPI标准
系统认证
Desktop
服务器
 
  Embedded Linux
嵌入式开发工具
VxWorks
WinCE
嵌入式Windows
 
  格蠹调试套件(GDK)
  格蠹学院
  小朱书店
  老雷的微博
  《软件调试》
  《格蠹汇编》
  《软件调试(第二版)》
沪ICP备11027180号-1

WinDbg

帖子发起人: Blade   发起时间: 2013-08-23 00:17 上午   回复: 2

Print Search
帖子排序:    
   2013-08-23, 00:17 上午
tongzhipeng 离线,最后访问时间: 2013/10/4 8:44:36 Blade

发帖数前50位
注册: 2013-07-04
发 贴: 28
windbg 扩展插件编译环境
Reply Quote
张老师您好, 我在看软件调试第5.2.3节部分的 LBR 这个实例程序, 因为我的CPU 是I5-2450M (INTEL® MICROARCHITECTURE CODE NAME SANDY BRIDGE)
LBR寄存器的数量 和 起始地址 都不一样, 所以我修改了这两个数值想 编译一下, 结果发现编译不过, 我是用VS2005编译, 网上找了一些入门教程 如 http://www.pediy.com/kssd/pediy09/pediy09-30.htm 说是要在DDK环境下编译, 所以想问一下老师是不是要去装这个环境 才能编译。 google上看到也有说VS 能照样编译的 http://blogs.msdn.com/b/sqlblog/archive/2009/12/30/tools-of-the-trade-part-iv-developing-windbg-extension-dlls.aspx 这个是用VS2008 编译的, 英语一大堆, 看得头晕, 懒得啃, 请老师 和 其他高手建议下, 使用哪个编译比较无痛 和 省事

附上VS2005 的编译错误
>Compiling...
1>StdAfx.cpp
1>j:\windbg\sdk\inc\wdbgexts.h(1655) : error C2061: syntax error : identifier 'nFields'
1>j:\windbg\sdk\inc\wdbgexts.h(1655) : error C3646: 'PFIELD_INFO' : unknown override specifier
1>j:\windbg\sdk\inc\wdbgexts.h(1655) : error C3646: 'Fields' : unknown override specifier
1>j:\windbg\sdk\inc\wdbgexts.h(1655) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>j:\windbg\sdk\inc\wdbgexts.h(1655) : warning C4183: '__field_ecount_opt': missing return type; assumed to be a member function returning 'int'
1>j:\windbg\sdk\inc\wdbgexts.h(2435) : error C2440: 'initializing' : cannot convert from 'FIELD_INFO *' to 'ULONG64'
1>        There is no context in which this conversion is possible
1>j:\windbg\sdk\inc\wdbgexts.h(2479) : error C2440: 'initializing' : cannot convert from 'FIELD_INFO *' to 'ULONG64'
1>        There is no context in which this conversion is possible
1>j:\windbg\sdk\inc\wdbgexts.h(2618) : error C2440: 'initializing' : cannot convert from 'FIELD_INFO *' to 'ULONG64'
1>        There is no context in which this conversion is possible
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : cannot open file '..\..\temp\Debug\LBR.sbr': No such file or directory
1>Build log was saved at "file://l:\swdbg\src\temp\Debug\BuildLog.htm"
1>LBR - 8 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

IP 地址: 已记录   报告
   2013-08-23, 14:12 下午
Raymond 离线,最后访问时间: 2020/7/3 3:40:25 格蠹老雷

发帖数前10位
注册: 2005-12-19
发 贴: 1,303
Re: windbg 扩展插件编译环境
Reply Quote
http://advdbg.org/blogs/advdbg_system/articles/5595.aspx
IP 地址: 已记录   报告
   2013-08-24, 21:46 下午
tongzhipeng 离线,最后访问时间: 2013/10/4 8:44:36 Blade

发帖数前50位
注册: 2013-07-04
发 贴: 28
Re: windbg 扩展插件编译环境
Reply Quote
谢谢张老师, 文章写的非常详细。
另外我编译错误是因为 __field_ecount_opt 引起的, 网上看到说直接把这个定义成空就行了, 所以我在stdafx.h里面加了一句 #define __field_ecount_opt(x), 讨厌的编译错误就没了, 有同样问题的朋友可以通过这个方式解决。

IP 地址: 已记录   报告
高端调试 » 软件调试 » WinDbg » windbg 扩展插件编译环境

 
Legal Notice Privacy Statement Corporate Governance Corporate Governance
(C)2004-2020 ADVDBG.ORG All Rights Reserved.